0

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.

2 Answers2

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