In [1]:
'hello'
Out[1]:
In [2]:
"world"
Out[2]:
In [3]:
'this is also a string of characters with an ordered iindex ready for using'
Out[3]:
In [4]:
'I\'m going on a trip to escapechar land'
Out[4]:
In [5]:
"I'm not, I double wrapped."
Out[5]:
In [6]:
'"So did I!" said noescapies.'
Out[6]:
In [7]:
"Let's try something very \r very new to Russ. Carriage return? Will it work? \n Who knows."
Out[7]:
In [9]:
"Let's try something very \rvery new to Russ. Carriage return? Will it work? \nWho knows."
Out[9]:
In [11]:
'I suspect UTF-8 encoding and not ASCII'
Out[11]:
In [12]:
print('hello')
In [13]:
print("Let's try something very \r very new to Russ. Carriage return? Will it work? \n Who knows.")
In [14]:
print("Let's try \t \t something very \n very new to Russ. \a Carriage return? Will it work? \n Who knows.\b ")
In [15]:
print("Let's try \t \t something very \n very new to Russ. \a Carriage return? Will it work? \n Who knows. \b ")
In [16]:
print("Let's try \t \t something very \n very new to Russ. \a Carriage \v \v return? Will it work? \n Who knows." + "\110\145\154\154\157\40\127\157\162\154\144\41")
In [23]:
print("Character named name in the Unicode database.")
\N{name}
In [24]:
"hello world one"
"hello world two"
Out[24]:
In [25]:
print("hello world one")
"hello world two"
Out[25]:
In [26]:
print("hello world one")
print("hello world two")
In [27]:
print('hellow \n world')
In [28]:
print('hellow \nworld')
In [31]:
print('hellow \n world \n hellow \n world \n hellow \n world \n hellow \n world \n hellow \n\t world \n\t hellow \n world \n\t hellow \n world \n hellow \n world \n hellow \n world \n hellow \n world \n hellow \n world \n hellow \n world \n hellow \n world \n hellow \n world')
In [38]:
print('hello \n \t hello \n \t \t hello \n \t \t \t hello \n \t \t \t \t hello \n \t \t \t hello \n \t \t hello \n \t hello \nhello')
In [39]:
len('hello')
Out[39]:
In [40]:
len('I am Happy')
Out[40]:
White space counts as indexed locations.
In [ ]: