Define the id in an extra class like:
class Var:
id = None
In
a.py, the id extracted each time is assigned to Var.id, and b.py can be directly used with Var.id. The above is for reference.
If it helps, please click to accept ~
A.puy has an interface for adding users, and its id has been extracted. B.puy has an interface for modifying users. Now we need to get the id of a.puy, how to get the id
encountered difficulties: by importing a.py, using classes. When the method gets the id, it executes a.py again and gets the id +1
0 Answer
Define the id in an extra class like:
class Var:
id = None
In
a.py, the id extracted each time is assigned to Var.id, and b.py can be directly used with Var.id. The above is for reference.
If it helps, please click to accept ~
这家伙很懒,什么都没留下...