Bruh
commit
2bf88a27a1
|
@ -0,0 +1,10 @@
|
|||
class ThomasMüller:
|
||||
pass
|
||||
|
||||
class MoritzLutz(ThomasMüller):
|
||||
pass
|
||||
|
||||
class MiriNahimiaLutz(ThomasMüller, MoritzLutz):
|
||||
pass
|
||||
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import re
|
||||
|
||||
|
||||
bruh = "If the the problem is textual, use the the re module"
|
||||
|
||||
txt = re.sub("the the", "the", bruh)
|
||||
|
||||
print(txt)
|
|
@ -0,0 +1,15 @@
|
|||
import re
|
||||
|
||||
def normalize(number):
|
||||
pattern = re.compile(r'\+?1?.?.?([2-9]\d{2}).?.?(\d{3}).?([2-9][0-8]\d{2}$)')
|
||||
|
||||
|
||||
tmp = pattern.match(number)
|
||||
if(tmp):
|
||||
return '1' + '-' + tmp.group(1) + '-' + tmp.group(2) + '-' + tmp.group(3)
|
||||
else: raise ValueError('Ungültige Telefonnummer')
|
||||
|
||||
bruh = normalize("1-989-111-2222")
|
||||
print(bruh)
|
||||
|
||||
|
Loading…
Reference in New Issue