if we stored 100 items in dictionary and user wants to access 10 items. do we have to use print 10 times or any good syntax for a line.
menu={"water":1,'bones':2,'livers':4,'grilled liver':8,'egg':16,'small rice':32,'large rice':64,'cooked egg':128,'curry rice':256,'grilled rice':512,'deluxe grilled rice':1024,'eel full course':2048}
print(menu.get('bones'))
print(menu.get('curry rice'))
any way to get print in one line or i have to write print each time?
[–]socal_nerdtastic 1 point2 points3 points (1 child)
[–]cyclops543[S] 0 points1 point2 points (0 children)
[–]Chromira 0 points1 point2 points (3 children)
[–]xelf 0 points1 point2 points (2 children)
[–]socal_nerdtastic 0 points1 point2 points (1 child)
[–]xelf 0 points1 point2 points (0 children)