Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyRegSetRange
#python 3.6.9 #PyRegSetRange #this code is created by Rezaul Hoque on February 16,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 = 'On Feb 16, police penalised/penalized a biker for doing stunts of valour/valor on the road of neighbourhood/neighborhood of squalor. ' pick= 'penali[sz]ed' trail = '\w*lou?r' throw= '[^a-zA-Z]' samples= re.finditer(trail, a) for sample in samples: print(sample.group()) doubles=re.finditer(pick,a) for double in doubles: print(double.group()) digits = re.finditer(throw,a) for digit in digits: print(digit.group())
run
|
edit
|
history
|
help
0
Lab_III_3_24_11_2020
L4-HW final
add lambda
Sum
0
Tax task
afw
Type
Hw
pythonfin