-3

I'm trying to use getpass library in python but I can't. Can somebody help me to use it in vscode?

I tried:

Getpass import as input

but it didn't work.

MafMal
  • 71
  • 5

2 Answers2

0

Use the correct Python syntax for importing the getpass module:

import getpass

We don't need to import the input function from a module because it is a built-in function in Python 3 versions.

Alon Alush
  • 719
  • 3
  • 15
0

There is no input name in the getpass library; you can find the docs here: https://docs.python.org/3/library/getpass.html

This is an example of usage:

import getpass

user = input("Username: ")
password = getpass.getpass("Password: ")
# do something with these credentials
crissal
  • 2,547
  • 7
  • 25