By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,056 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,056 IT Pros & Developers. It's quick & easy.

what is wrong? import re tutorGroup = input(

P: 1
Expand|Select|Wrap|Line Numbers
  1. import re
  2. tutorGroup = input("Enter you tutor group - e.g. 10MC: ")
  3. valid = re.match([0-9][0-9][A-Z][a-z], tutorGroup)
  4. if valid:
  5.     print("OK!")
  6. else:
  7.     print("Invalid!")
2 Weeks Ago #1
Share this Question
Share on Google+
1 Reply


gits
Expert Mod 5K+
P: 5,330
not a python expert - but to me the issue seems to be that the pattern has to be passed to the match method as parameter of type string.
2 Weeks Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.