Colab

print("😥")

😥
print("\u20ac")

print("かわいい")

かわいい
print("\U0001F622")

😢
print("\N{euro sign}")

print("€")

"😥".encode("utf-8")

b'\xf0\x9f\x98\xa5'
print("\a")


print("hello \n hello")

hello 
 hello
print("hello \\n hello")

hello \n hello
print("c:\newfile.txt")

c:
ewfile.txt
r"c:\users\user\newfile.txt"

'c:\\users\\user\\newfile.txt'
'I enjoy "sarcasm"'

'I enjoy "sarcasm"'
"'I think therefore I am' - someone"

"'I think therefore I am' - someone"
"'I think therefore I am' - someone \"important\""

'\'I think therefore I am\' - someone "important"'
x = '\'I think therefore I am\' - someone "important"'

x

'\'I think therefore I am\' - someone "important"'
[1,2,3]

[1, 2, 3]
x = "I am Daniel\n" + "I am Sam\n" + "Sam I am\n" 
print(x)

I am Daniel
I am Sam
Sam I am

x = "I am Daniel\n"  "I am Sam\n"  "Sam I am\n" 
print(x)

I am Daniel
I am Sam
Sam I am

x = "I am Daniel\n" \
"I am Sam\n" \
"Sam I am\n" 

print(x)

I am Daniel
I am Sam
Sam I am

# below is a multiline string
# multiline comments would be nice, right?
# instead we use multiline strings
x = """\
I am Daniel

I am Sam
Sam I am

"That Sam-I-am"
That Sam-I-am!
I do not like
'That Sam-I-am'

Do you like
Green eggs and ham
"""

print(x)

I am Daniel

I am Sam
Sam I am

"That Sam-I-am"
That Sam-I-am!
I do not like
'That Sam-I-am'

Do you like
Green eggs and ham

help(len)

Help on built-in function len in module builtins:

len(obj, /)
    Return the number of items in a container.

def myfirstfunc(x,y):
    """
    this is the functions documentation written by me :-)
    """
    return "bye"

help(myfirstfunc)

Help on function myfirstfunc in module __main__:

myfirstfunc(x, y)
    this is the functions documentation written by mre :-)

str(42)

'42'
"BLAH".lower()

'blah'
"the quick brown fox jumped over the lazy dog".replace("the", "da")

'da quick brown fox jumped over da lazy dog'
"the quick brown fox jumped over the lazy dog".find("the")

0
"the quick brown fox jumped over the lazy dog".find("fox")

16
"the quick brown fox jumped over the lazy dog"[16:]

'fox jumped over the lazy dog'
"*" * 4

'****'
"hello " * 10

'hello hello hello hello hello hello hello hello hello hello '
"\n\t\r".isspace()

True
r"\n\t\r".isspace()

False
print(r"\n\t\r")

\n\t\r
x = input("give me your password: ")

give me your password: 1234567890
x

'1234567890'