Python 3 Flashcards
1
Q
Python User Input Functions
A
- input()
- raw_input()
2
Q
function is used to take input from the user. It always returns the input as a string, regardless of what the user enters.
A
input()
3
Q
function is similar to input() in Python 3.x. It reads a line from input, converts it to a string, and returns it. It doesn’t try to evaluate the input, making it safer for general use.
A
raw_input()
4
Q
To add an item to the end of the list
A
append()
5
Q
To insert a list item at a specified index
A
insert()
6
Q
To append elements from another list to the current list, use the
A
extend()
7
Q
method removes the specified item.
A
remove()
8
Q
method removes the specified index.
A
pop()
9
Q
A