Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyAnchorAlter
#python 3.6.9 #PyAnchorAlter #this code is created by Rezaul Hoque on February 14,2022; #contact:jewelmrh@yahoo.com;Dhaka,Bangladesh;https://rezaulhoque.wordpress.com,https://hoquestake.blogspot.com #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; import re a = 'We bought two tickets at Tk 300.50. We started our journey at 06:30. We made a brief stop at a roadside tea stall at 10:30 and took our breakfast there. We ate 2.5 pounds of cake and 1.5 dozens of orange. We resumed our journey 11:30. But the clock inside the bus showing 111:300. Finally we reached our destination at 17:59.' pick = r'([01]\d|2[0-3]):[0-5]\d' samples = re.finditer(pick, a) for sample in samples: print(sample.group()) s='111:222' f=r'\d\d\d$' fractions=re.finditer(f,s) for fraction in fractions: print(fraction.group())
run
|
edit
|
history
|
help
0
python_study_note_for loop@nested loop
pico menu
pico menu
Chtkav
emoji
Palindrome using recursion
Reading XML File
Fgjei
Recur_fact_stkovrflw
PySRP