In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
In this article Xiaobian for you to introduce in detail "python how to format the variable output", the content is detailed, the steps are clear, the details are handled properly, I hope this "python how to format the variable output" article can help you solve your doubts, the following follow the editor's ideas slowly in-depth, together to learn new knowledge.
Description
1. If you want to output data together with text information, you need to use a formatting operator.
2.% is called the formatting operator and is used specifically to handle formatting in strings.
Contains a string of%, called a formatted string.
% and different character connections are used, and different types of data require different format characters.
Example
Name = input ("Please enter name:") company = input ("Please enter Company:") title = input ("Please enter position:") phone = input ("Please enter phone:") email = input ("Please enter email:") print ("*" * 50) print (company) print () print ("% s (% s)"% (name) Title) print () print ("phone:% s"% phone) print ("mailbox:% s"% email) print ("*" * 50) read here This "python how to format variables output" article has been introduced, want to grasp the knowledge of this article also need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.