If we have a requirement to generate fake data in Python then we may make the use of the Faker module and get our work easily done.
So today this blog stands to explain how do you create a fake profile in Python.
Steps:
You need to create a project in your compiler and name it.
Then we need to now install a module which will make our work much more easy.
The module is:
pip install Faker
After the installation we just need to write the code and get it compiled.
Importing faker: from faker import Faker Assigning Faker: fake = Faker() Printing some lines: print(fake.name()) print(fake.email()) print(fake.country()) print(fake.profile()) Full Code: from faker import Faker fake = Faker() print(fake.name()) print(fake.email()) print(fake.country()) print(fake.profile()) You may refer the video for more clarity.