4a6f6e69
4a6f6e69
MModular
Created by aviral shastri on 9/11/2023 in #questions
Mojo user input
Something I tried and worked looked like this:
from python import Python

fn ask_name() raises -> String:
let user_input = Python.evaluate("input('What is your name? ')").to_string()
return user_input
from python import Python

fn ask_name() raises -> String:
let user_input = Python.evaluate("input('What is your name? ')").to_string()
return user_input
57 replies