#Exercise 1 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[-1]) #Exercise 2 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[7]) #Exercise 3 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[-10]) #Exercise 4 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.index("B")) #Exercise 5 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.count("o")) #Exercise 6 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.upper()) #Exercise 7 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.find("Bitcoin")) #Exercise 8 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.startswith("X")) #Exercise 9 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.swapcase()) #Exercise 10 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.replace(" ", "")) #Exercise 11 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.replace("i", "btc")) #Exercise 12 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.split(",")) #Exercise 13 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print("&".join(my_string)) #Exercise 14 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." my_other_string = "Poor guy!" print(my_string + my_other_string) #Exercise 15 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string.title()) #Exercise 16 - Solution my_string = "In %s, someone paid %s %s for two pizzas." print(my_string % ("2010", "10k", "Bitcoin")) #Exercise 17 - Solution my_string = "In {}, someone paid {} {} for two pizzas." print(my_string.format("2010", "10k", "Bitcoin")) #Exercise 18 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[3:7]) #Exercise 19 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[-23:-16]) #Exercise 20 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[:12]) #Exercise 21 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[-9:]) #Exercise 22 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[::-1]) #Exercise 23 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[::7]) #Exercise 24 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[10:]) #Exercise 25 - Solution my_string = "In 2010, someone paid 10k Bitcoin for two pizzas." print(my_string[:-4])