Too many of you are learning Python and just say you want to be a full-stack developer later, do you know what this is? Do you know what this means? What do we know now, and what do you need to be a full-stack developer in the future? We can learn from the name, "full" is the same as mastering all the content, yes, here is to master all the programming skills, enough to independently develop the person, so the full-stack sergeant might as well be called "full warrior", if you want to do it, then look at the following can use the Grammar it.
1、Chinese encoding-UTF8 character set
#!/usr/bin/env python # coding:utf8
2. Values
a = 1 b = 2.1 print a, b
3, label label is mainly used to optimize
First method.
<label> Enter account number: <input type="text" /> </label> <label for="male">Male</label> <input type="radio" name="sex" value="male">
4. fieldset element
<fieldset> <legend>user login</legend> caption user ID: <input type="text"><br /><br /> name of an ancient state classifier for length or distance (yard), happenings etc: <input type="password"> </fieldset>
Python Full Stack Development Knowledge Extension
variant
# Concept: Store intermediate values generated during program execution in memory. For later use.
# Naming conventions.
1. Use of numbers. Letters. Composed of underscores
2. Cannot begin with a number. And not just numbers.
3. No python keywords can be used
4. Do not use Chinese
5. Not too long # Except for front-end
6. Be meaningful
7. Case sensitive
8. Recommended use of humps or underscores
Capitalize the first letter of each word (Big Hump, Little Hump is the first word with the first letter lowercase, the rest with the first letter uppercase.)
Separate each word with an underscore
Formatted output
- %s String placeholder (but all data types can be used)
- %d numeric placeholder (only int types can be used)
- f "{variable}"
name = input("Please enter your name:")
address = input("Please enter where you are from:")
wife = input("Please enter your wife:")
notlike = input("Please enter a star you don't like:")# What needs to be mastered ===============
# Formatted output %s
print("My name is %s, I'm from %s, my wife is %s, I don't like %s" % (name, address, wife, notlike))
# New version of formatted output f"{variable}"
print(f "My name is {name}, I'm from {address}, my wife is {wife}, I don't like {notlike}")
# % is a placeholder, if you want to display the normal % %% escape. % is a placeholder, if you want to display the normal % %% escape.
print("My name is %s, and I've spent 30% of my life" % "Yu Hongmin") # error not enough arguments for format string
print("My name is %s, and I've spent 30%% of my life" % "Yu Hongmin")
This article on python full-stack development syntax summarizes the article is introduced to this, more related python full-stack development syntax is what content please search my previous articles or continue to browse the following related articles I hope that you will support me more in the future!