I am working on a python project, where I am required to include an input, and another value (which will be manipulated).
For example,
If I enter the string 'StackOverflow'
, and a value to be manipulated of 'test'
, the program will make the manipulatable variable equal to the number of characters, by repeating and trimming the string. This means that 'StackOverflow'
and 'test'
would output 'testtesttestt'
.
This is the code I have so far:
originalinput = input("Please enter an input: ")
manipulateinput = input("Please enter an input to be manipulated: ")
while len(manipulateinput) < len(originalinput):
And I was thinking of including a for
loop to continue the rest, but am not sure how I would use this to effectively manipulate the string. Any help would be appreciated, Thanks.