What does the bitwise NOT operator (~) applied five times to the number 7 evaluate to?
x = frozenset(('A', 'B', 'C'))
print(x)
To shuffle the list(say list1) what function do we use?
What is the output of the following Python statement?
print("Hello" + 1 + "World")
Which of the following is not the correct syntax for creating a set?
Identify the correct syntax of the range()
function in Python.
Deduce the output of the following code:
def fun(n):
if n == 1 or n == 0:
return 1
else:
return fun(n-1) + fun(n-2)
print(fun(5))
What will be the output of the following Python code?
x = ['ab', 'cd']
for i in x:
i.upper()
print(x)
What will be the output of the following code?
a = [6, 7, 8, 9, 10]
b = [1, 1, 1, 1, 1]
c = map(lambda x, y: x * y, a, b)
Print the list(c)
Given the code block below, how many rows will be printed by the df.head()
function? Assume Test.csv has 1436 rows.
import pandas as pd
df = pd.read_csv('Test.csv')
df.head()