What will the following code output?
a=5;b=7 b=a print(a,” ”,b)
5 7
7 5
5 5
7 7
a,b,c=3,5,6 b,c,a=a,b,c print(a,” ”,b,” ”,c)
3 5 6
6 3 5
5 6 3
6 5 3
a,b,c=3,5,6 b,c,a=a+1,b+2,c+3 print(a,” ”,b,” ”,c)
7 9 4
4 7 9
9 4 7
a=5 a*=10 print(a)
5
10
50
Error
a=‘INFOMAX’ a=10 print(type(a))
<class 'int'>
<class ‘str'>
<class ‘bool'>
a=555 b=55 print( b in a)
True
False
55
TypeError
a=55 b=’55’ print( a is not b)
a=55 b=55 print( a is not b)
6
1
1.5
Removes all spaces from the string.
Removes the first and last character of the string.
Removes whitespace from the beginning and end of the string.
Converts the string into a list of characters.
startswith()
startswith_prefix()
startswithwith()
startswiths()
19
18
17
Strings can be modified using indexing.
Strings are immutable.
Strings can only contain alphabetic characters.
Strings must end with a newline character.
capitalize()
pop()
find()
insert()
append()
extend()
add()
It returns None.
It raises an IndexError
It creates a new element at that index.
It returns an empty list.
empty_tuple = ()
empty_tuple = tuple()
empty_tuple = []
Both A and B
t1=1,2,4
t1=(1,)
t1=tuple(“123”)
All of these
(1)
(1,)
[1]
{1}
index()
remove()