diff --git a/DataStructure/hetro.py b/DataStructure/hetro.py new file mode 100644 index 0000000..de3ed10 --- /dev/null +++ b/DataStructure/hetro.py @@ -0,0 +1,17 @@ +# program to search an element from a list of different type of values +# Developed by : rakesh kumar +# Last revised on : 20-lujy-2019 + +list =[10,20,'a','abc',40,50.6] +a = input("Enter any number") +try: # if we are able to type cast the value + b = eval(a) + if b in list: + print("found") + else: + print("not found") +except: # if some run time error occur while conversion + if a in list: + print("Found") + else: + print("not found") diff --git a/similar_word.py b/similar_word.py index d3350ca..8050577 100644 --- a/similar_word.py +++ b/similar_word.py @@ -1,5 +1,5 @@ # Python program to print the similar -# words using Enchant module +# words using Enchant module # Importing the Enchant module import enchant diff --git a/string/reverseString.py b/string/reverseString.py index 6696108..7ede82b 100644 --- a/string/reverseString.py +++ b/string/reverseString.py @@ -1,3 +1,3 @@ str = "This is original string" rev = ''.join(reversed(str)) -print(rev) \ No newline at end of file +print(str[::-1]) \ No newline at end of file diff --git a/webscraper/youtubeDownloader.py b/webscraper/youtubeDownloader.py index 7a53bc0..2703d85 100644 --- a/webscraper/youtubeDownloader.py +++ b/webscraper/youtubeDownloader.py @@ -4,4 +4,4 @@ import shutil ydl_opts = {} with youtube_dl.YoutubeDL(ydl_opts) as ydl: - ydl.download(['https://www.youtube.com/watch?v=AOcWELTI56Q&index=3&list=PLbpAWbHbi5rMM3i--gfgjwQ404DZmwwd3']) \ No newline at end of file + ydl.download(['https://www.youtube.com/watch?v=HgwCeNVPlo0']) \ No newline at end of file