The path to python, the path to python

Source: Internet
Author: User

The path to python, the path to python

Input, user interaction,

1 #! /Usr/bin/env python 2 3 name = input ("your name is:") 4 age = int (input ("your age :")) 5 job = input ("your job:") 6 salary = input ("your salary :") 7 8 info = '''9 --------- info of {_ name} ------- 10 Name: {_ name} 11 Age: {_ age} 12 Job: {_ job} 13 Salary: {_ salary} 14 '''. format (_ name = name, 15 _ age = age, 16 _ job = job, 17 _ salary = salary) 18
19 print (info)
1 your name is: mark 2 your age: 33 3 your job: it 4 your salary: 10000 5 6 --------- info of mark ------- 7 Name: mark 8 Age: 33 9 Job: it10 Salary: 10000
View Code

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.