pr3-skriptspr-gruppef-sl1/s1_a61_2.py

11 lines
148 B
Python

#6.
s = "This is a test"
print(s)
#1.
print("Spaces replaced with '-':", s.replace(' ', '-'))
#2.
s1 = "Hello, World"[-7::-1]
print(s1)