What is the error in this syntax:
Numbers = {0:'zero' , 1:'one' , 2:'two' , 3:'three' , 4:'four ', 5:'five' , 6:'six' , 7:'seven ', 8:'eight' , 9:'nine'} a = int( input( 'Enter a number: ') b ='' for i in a: key = int(a) c = Numbers[key] b = b + ' ' + c print('Number name = ' ,b)
T=[20,30,50,60,70]
L=(3,6,7,8,9,)
T(2)=45
L(3)=101
What is the error in this syntax:
Numbers = {0:'zero' , 1:'one' , 2:'two' , 3:'three' , 4:'four ', 5:'five' , 6:'six' , 7:'seven ', 8:'eight' , 9:'nine'}
a = int( input( 'Enter a number: ')
b =''
for i in a:
key = int(a)
c = Numbers[key]
b = b + ' ' + c
print('Number name = ' ,b)
- To find the number of elements in a list
- To find largest and lowest value in a list.
- To count the occurrences of an element in a list.
- To find the position of an element in a list.
- To insert an item at a given position in a list.
- To add more than one element to the end of the list.
- To remove and returns the element at given position.
To remove all items from a list.For eg: if input is [ 1,2,3,4,5,6,7,8]
Output will be: [2,1,4,3,6,5,8,7]