Big Liar python variable

Source: Internet
Author: User

Variable hardest Hit

I. Variables and naming conventions 1.1 What is a variable?

As the name implies, the changing amount is variable. Give a chestnut: a = 0. A is a variable, reason: After a assignment of 0, you can re-assign a = 1 a=2 a=3.etc

1.2 Inverse scales of variables:

What are the non-palpable scars of a variable? It cannot be named after numbers, letters, or underscores (the Chinese civilization has a long history, and it can support variable names, eat a pound of 0000)

Second, you can not use Python to bring the keyword name (aforetime as king, is absolutely not allowed to drip), a chestnut: for While.etc,

It is best not to use variable names that may conflict (how to bypass them), such as the function name sum (). etc

1.3 General format of variables:

For example, the value of a garment: Value_of_cloth or Valueofcloth, the words should be the following or uppercase distinction, while assigning variables to the meaning

Today's content rarely 0.0 slip over and don't miss it!

Tip: Today, share a little bit of code 0.0 can be implemented by the automatic reply Oh, although without intelligence (no spelling mistake right!!) )

  

  

ImportItchat#Import Time#reply@itchat. Msg_register (Itchat.content.PICTURE)deftext_reply (msg):Print(msg)return 'I received a%s'%Msg@itchat.msg_register (Itchat.content.TEXT)deftext_reply (msg):Print(msg)#return msg@itchat. Msg_register (Itchat.content.TEXT)deftext_reply (msg):ifMsg.text = ='Hello': Itchat.send ('Hello, excuse me, the house gas just burns up, I go back to take a picture')    Else: Itchat.send (msg.text)#Robotic reply@itchat. Msg_register (Itchat.content.SHARING)deftext_reply (msg):Print(msg) itchat.auto_login (hotreload=True) Users=itchat.search_friends ("unwilling to mediocre friends wow") UserName= users[0]['UserName']Print(UserName) itchat.run ()

Big Liar python variable

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.