{1: 'JavaTpoint', 2: 'Peter'} Python also provides a built-in methods popitem() and clear() method for remove elements from the dictionary. The popitem() removes the arbitrary element from a dictionary, whereas the clear() method removes all elements to the whole dictionary. Iterating Di...
str1 = 'hello javatpoint' #string str1 str2 = 'how are you' #string str2 print (str1[0:2]) #printing first two character using slice operator print (str1[4]) #printing 4th character of the string print (str1*2) #printing the string twice print (str1 + str2) #printing the ...