I am trying to create a program that cycles through a string, This is what i have so far.
def main():
name = "firstname lastname"
for i in name:
print(name)
name = name[1::]
main()
This just gives me
firstname lastname
irstname lastname
rstname lastname
stname lastname
tname lastname
and so on till the last letter.
This kind of does what i want but not fully.
What i want this program to do is to print something like this.
firstname lastname
irstname lastname f
rstname lastname fi
stname lastname fir
tname lastname firs
name lastname first
ame lastname firstn
me lastname firstna
and so on....cycling thorugh the string, but i cant quite get it. Any help please.
Thanks in advance