Småfixar
This commit is contained in:
@@ -4,9 +4,9 @@ print(my_string)
|
||||
for i in my_string:
|
||||
print(i)
|
||||
|
||||
#strings are immutable i.e. can't change them but you can replace them
|
||||
#code below causes error
|
||||
#my_string[5] = "z"
|
||||
# strings are immutable i.e. can't change them but you can replace them
|
||||
# code below causes error
|
||||
# my_string[5] = "z"
|
||||
my_string = "Whole new string"
|
||||
print(my_string)
|
||||
|
||||
@@ -17,6 +17,7 @@ print('String1 * 5 =', string1 * 5)
|
||||
|
||||
string3="GoSa WiTh PyThOn!"
|
||||
bacon_ipsum="Bacon ipsum dolor amet prosciutto rump short ribs pork chop venison sausage"
|
||||
|
||||
print(string3.upper())
|
||||
print(string3.lower())
|
||||
print(bacon_ipsum.split())
|
||||
|
||||
Reference in New Issue
Block a user