import pyqrcode | |
from IPython.display import Image, display | |
s = input("Paste the link: ") | |
# Generate QR code | |
url = pyqrcode.create(s) | |
file_name = "myqrcode.png" | |
url.png(file_name, scale=10) | |
# Display the PNG file | |
def show_png(file): | |
display(Image(file)) | |
show_png(file_name) |