I wanted to create directories of the definite names on python. I used jupyter and in the first case it worked perfectly well.
I am using a window system mkdir suraj It creates a directory named suraj.
Since this worked, I set up a loop to create 10 directories.
for i in range(1,10):
x= "dir"+str(i)
mkdir(x)
Error is :-
NameError Traceback (most recent call last) <ipython-input-5-9da2633c1170> in <module>
1 for a in d:
----> 2 mkdir(a)
NameError: name 'mkdir' is not defined
Why mkdir is not defined in the name although it successfully created a director in the above command.
Image of Code with Error:
