DEV Community

Héctor Pascual profile picture

Héctor Pascual

404 bio not found

All 31 comments

Download YouTube videos using Python

wow.. how easy!

How to do language translation in Python

Cool, thanks for sharing. Seems like the most up to date libr...

Desktop organization with Python

Is the program always running on a thread until you CTRL+C th...

Daily Challenge #121 - Who has the most money?

Hi, check this decorator : docs.python.org/3/library/func...

Daily Challenge #121 - Who has the most money?

My Python attempt : Using total_ordering decorator from fu...

Daily Challenge #120 - Growth of a Population

A python one using recursion : def nb_year(p0, inc, new_co...

Daily Challenge #120 - Growth of a Population

I implemented the same but using recursion, check if you wa...

Daily Challenge #48 - Facebook Likes

Python goes there : def likes(*args): return { ...

Daily Challenge #47 - Alphabets

that's crazy

Daily Challenge #47 - Alphabets

Python : lambda s : ' '.join([str(ord(c)-ord('a')+1) for c...

Daily Challenge #46 - ???

As simple as it sounds, in python : lambda s : re.sub(r'\...

Daily Challenge #44 - Mexican Wave

My python sol : def wave(s): wave_list = [] for i...

Daily Challenge #42 - Caesar Cipher

Python : def cypher(m, key): m_cypher = '' for i i...

Daily Challenge #41 - Greed is Good

My python sol : def play_greed(): score = [random.rand...

Daily Challenge #40 - Counting Sheep

Python : def count_sheep(n): for i in range(1,n+1): ...

Daily Challenge #39 - Virus

Nice, that way (checking words containing dots) you can che...

Daily Challenge #39 - Virus

Ok then split document by lines and call the function : do...

Daily Challenge #36 - Let's go for a run!

Python : def running_pace(distance, time): time_split ...

Daily Challenge #35 - Find the Outlier

Python : def find_outlier(array): odd = [i for i in ar...

Daily Challenge #37 - Name Swap

Python : def name_shuffler(name): return ' '.join([name.spli...

Daily Challenge #39 - Virus

Python : import re def fix_virus(document): doc = doc...

Daily Challenge #38 - Middle Name

Python : def middle_name(full_name): names = full_name...

Daily Challenge #33 - Did you mean...?

It's not working 100% but for most basic cases it does, fir...

Daily Challenge #34 - WeIrD StRiNg CaSe

Python with a function : def to_weird_case(string): w...

Daily Challenge #4 - Checkbook Balancing

Python: import re checkbook = """1233.00 125 Hardware;! 2...

Daily Challenge #3 - Vowel Counter

Python Given the list : vowels = ['a', 'e', 'i', 'o', 'u'...

Daily Challenge #2 - String Diamond

Python : def diamond(mid_len): if not mid_len or mid_l...

Daily Challenge #33 - Did you mean...?

Here it goes a python one : I compare by the distances of ...

Daily Challenge #32 - Hide Phone Numbers

My python sol : import re def hide_number(phone): if ...

Daily Challenge #27 - Unlucky Days

My python sol : def unlucky_days(year): count = 0 ca...

Daily Challenge #29 - Xs and Os

Python goes there : def XO(input): x_count = 0 o_c...

loading...