YouTube link finder | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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])

7th Jun 2021, 2:51 PM
matt
5 Answers
+ 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!
7th Jun 2021, 3:46 PM
Lothar
Lothar - avatar
+ 8
What is your question?
7th Jun 2021, 2:55 PM
Isaac Fernandes
Isaac Fernandes - avatar
+ 5
YouTube Link Finder answer is 👇 print(input()[-11:])
9th Jun 2021, 8:53 AM
Tharul Nejana
Tharul Nejana - avatar
+ 1
Cool
8th Jun 2021, 5:13 AM
ANURAG RAJ
ANURAG RAJ - avatar
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
7th Jun 2021, 3:56 PM
matt