Content
o Run Terminal Help K) Get Started Tomato java Tonarijava Ci Users batch1 Desktop m username,py ‘import random def isvalidusername (username): if len(username) 6: return False if len(username) 6: return False if not any (char. isdigit() for char in username): return False if any (r’ ‘ , username) : return False return True username – input("Enter your username") if isvalidusername (username): print ("username is valid") else: print ("username is valid" username,py – Tamago – Visual Studio Code Etudiant, ava F Keyboard Shortauts 8 g 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 Bruh whoever wrote this code.. it’s shit ma man : here’s a better code… Why on earth are you even importing random? from re import match def isValid (username) : if match(ra-ZA-ZO-91(6), username) : return True return False if isValid("potato"): print("Valid"y else: print("Not valid") What an embarassment ( ch O