+ 1
YouTube link finder
https://www.sololearn.com/coach/74?ref=app #This code works #it finds the 11 character link from the given YouTube address link = input() start = link + 'a' print(start[-12:-1])
5 Réponses
+ 8
matt ,
your code does work for the <long> and <short> version of the link. what you don't need is :
start = link + 'a'
you can remove this line and use this snippet instead:
print(link[-11:])
▪︎but if you have no question according this task, it is not the right place to publish it here.
thanks!
+ 8
What is your question?
+ 5
YouTube Link Finder answer is 👇
print(input()[-11:])
+ 1
Cool
0
Thanks Lothar, I couldn't quite figure out how to get the last 11 charcters of the string to print. The range I was using would only output from [-11] to [-2]. That's why I had the 'start' variable