E&ICT IIT Roorkee - Data Engineering Course at Rs. 2,999 (90% OFF) | Expires in

 Enroll Now

Python (Videos and MCQs)

23 / 80

Python - String Operations

In Python there are several String Operations. The "*" operator can be used to repeat a string multiple times and form a larger string. For eg. to repeat the string "game", 5 times and store it in a variable called games use games = "game" * 5

* Instructions *

Define a variable called animal with a value of "cat". Using string operations define another variable called ten_animals having 10 times the string stored in animal.