Python Variables Quiz (original) (raw)

How do you concatenate two strings in Python?

What is the purpose of the __dict__ attribute in Python?

How do you create a dictionary using a comprehension in Python?

How do you create a multiline string in Python?

How do you convert a floating-point number to an integer in Python?

How do you convert a list of strings to a single string in Python?

What is the output of the following code?

x = [1, 2, 3, 4]
y = filter(lambda a: a % 2 == 0, x)
print(list(y))

What is the purpose of the enumerate() function in Python?

How do you check if a key is present in a dictionary?

How do you find the length of a list in Python?

There are 24 questions to complete.

Take a part in the ongoing discussion