Podcast
Questions and Answers
Which of the following is NOT a built-in data type in Python?
Which of the following is NOT a built-in data type in Python?
- str
- list
- tuple
- int
- array (correct)
What is the output of the following code snippet?
a = [1, 2, 3]
print(a[3:])
What is the output of the following code snippet?
a = [1, 2, 3] print(a[3:])
- [1, 2]
- None
- [] (correct)
- IndexError
What is the difference between 'range' and 'xrange' in Python 2?
What is the difference between 'range' and 'xrange' in Python 2?
- There is no difference
- 'range' is used for strings
- 'xrange' is used for floating point numbers
- 'range' returns a list and 'xrange' returns an iterator (correct)