473,545 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what is wrong? import re tutorGroup = input(

1 New Member
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!")
Sep 28 '19 #1
1 1197
gits
5,390 Recognized Expert Moderator Expert
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.
Oct 1 '19 #2

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

Similar topics

5
3197
by: Lee Redeem | last post by:
Hi there I've created abd uploaded this basic PHP script: <html> <head> <title>PHP Test</title> </head> <body> <H1 align="center">
4
1783
by: Fang | last post by:
Hi, I'm new to PHP. I followed an example on the book and wanted to pass a variable from one html page to a php page, but it always tells me the passed variable is undefined. I've checked the syntax over and over again, but I couldn't find the problem. I also tried to change POST to SUBMIT and noticed the value of the variable can be passed. ...
3
1615
by: Ali | last post by:
The following program is supposed to display a dropdown menu, however, it only shows the File and Help things. from Tkinter import * root = Tk() #create menu m = Menu(root) root.config(menu=m)
5
3664
by: Koen | last post by:
Hi all, I am experimenting with DAO. I wrote this sub to update one specific field of one specific row in one specific table. Nothing wrong with the SQL statement, but when I execute this I get 'Invalid Operation'. ******************* code ************************* Sub UpdateObsStatusAfterStatusChange(intObsID As Integer, intNewValue As...
1
1010
by: COHENMARVIN | last post by:
Suppose I'm writing an ASP.net page with collections, sql server database connections, etc. How do I know what '@import' directives I am supposed to use? Also, is there compilation I am supposed to do with code-behind classes? If so, how do I know what libraries to link them to when I compile them with vbc.exe? Thanks, CohenMarvin
8
1432
by: Polaris | last post by:
Hi Experts: The program creates Panels and inicilize them. When I run the code below, the program crashes (at the line commented below). Any help is appriciated. Thanks in Advance! Polaris private void createPanels (int nPanelCount)
14
1790
by: howa | last post by:
void reverse_string(char *str) { if (str == NULL) return; char tmp; size_t len = strlen(str); size_t mid = (int) len / 2; for (size_t i = 0; i < mid; i++) {
2
3161
by: doudou88 | last post by:
Hello, I try to debug a c# program using mono-debugger. But i need first to create .exe.mdb file, using the folowing command: gmcs -debug program.cs When doing this I get the following error: error CS0246: The type or namespace name `MyNamespace' could not be found. Are you missing a using directive or an assembly reference? I have...
3
7320
by: muddasirmunir | last post by:
I am trying to give the following Icon in my form in vb6. http://www.mediafire.com/?ymzgkgyi50j But , when I put this in my form I got error "Invalid Picutre" What wrong in it? How to add this in my forms?
0
7398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5969
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4944
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1878
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.