The code is:

list= ['Сергей','Василий'] print(list[0]) print(list[0],'и',list[1]) 

Displays:

Sergei

('\ xd0 \ xa1 \ xd0 \ xb5 \ xd1 \ x80 \ xd0 \ xb3 \ xd0 \ xb5 \ xd0 \ xb9', '\ xd0 \ xb8', '\ xd0 \ x92 \ xd0 \ xb0 \ xd1 \ x81 \ xd0 \ xb8 \ xd0 \ xbb \ xd0 \ xb8 \ xd0 \ xb9 ')

What to make, that the second print deduced in the same way, as well as the first (in the normal coding)?

    1 answer 1

     list= ['Сергей','Василий'] print(list[0]) print(list[0] + ' и ' + list[1]) 

    or

     list= ['Сергей','Василий'] print(list[0]) print list[0], 'и', list[1] 
    • @ Kirill_Malyshev And with such a similar case, tell me? How to overcome the encoding in the second print? (Put __ where the line feed is) dict = {'Ice cream': [{'Type': 'Ice cream', 'Price': 256}, __ {'Type': 'Eskimo', 'Price': 221}]} __ print dict ['Ice cream'] [0] ['Type'] __ print dict ['Ice cream'] [0] # Dictionary key access __ Ice cream __ {'\ xd0 \ xa2 \ xd0 \ xb8 \ xd0 \ xbf' : '\ xd0 \ x9f \ xd0 \ xbb \ xd0 \ xbe \ xd0 \ xbc \ xd0 \ xb1 \ xd0 \ xb8 \ xd1 \ x80', '\ xd0 \ xa6 \ xd0 \ xb5 \ xd0 \ xbd \ xd0 \ xb0' : 256} - J.Doe