# print('COMPARE TEXT:') print('Anna' == 'anna') print('bus' < 'busa') print('buss' < 'busar') print ('betar' < 'het') # print('\nCONVERT TEXT:') s='124' # A string print('String s:', s) my_list = list(s) # ['1', '2', '4'] but a is still a string print('s converted to a list:', my_list) print('But s is unchanged:', s) x = int(s) #Doesn't work if s='rs124' print('Convert the string s with numbers to integer:', x) print("It's now possible to do math operations:'", x/2) print('Convert to float:',float(s)) print('Convert to tuple:',tuple(s)) print('Convert to list:',list(s)) print('\nAll characters have a code, UNICODE (about 1.1 mil.):') print('A=', ord('A'),' and ', 'a=',ord('a')) #Decimal representation print('chr(65)=',chr(65)) #decimal repersentation print('\u0068') #hexadecimal representation print('\uA9A4') #Javanese print('I feel \u26A1! I need \u26FE') print('\N{GOTHIC LETTER OTHAL}') # What happens here: for i in range(26): print(chr(65+i),'->',chr(97+i),';',end='') print('\n')