Recently I wrote the following code...1 Its working fine in Python IDLE. But in VS Code flags error saying "partially initialized module 're' has no attribute 'search' (most likely due to a circular import)". Please help.
Asked
Active
Viewed 271 times
2 Answers
0
Your filename is re.py, so your script is trying to import itself when you do import re
.
Change your filename.

enzo
- 9,861
- 3
- 15
- 38
0
You gave the name: re.py
. Now when you do import re
you are sort of importing your own file.
Changes your file's name to something else like re_file.py
-
I din't knew that was possible... – Darshil Mistry Jul 31 '21 at 01:14