官术网_书友最值得收藏!

Creating variables

To create a variable, you need to do two things:

  • Declare the variable
  • Assign a value (data) to the variable

As an example, let's make a variable, foo, and assign it the value bar. The code to do this would be:

foo = "bar"

That single line of code declares a variable and assigns a string value to the variable. If you break it into several parts, the actual line of code consists of the following pieces:

Why are there quote marks around bar? What is a string value? These questions will be answered in the coming two sections,  Basic types and  S tring types.
主站蜘蛛池模板: 南平市| 乌鲁木齐市| 闽侯县| 隆德县| 琼结县| 长岭县| 台南市| 惠来县| 韶关市| 珠海市| 牡丹江市| 穆棱市| 新兴县| 安泽县| 广元市| 扬中市| 东丽区| 来宾市| 谢通门县| 庆安县| 襄城县| 兰州市| 潜山县| 宁明县| 衡南县| 固原市| 山东| 班玛县| 四子王旗| 舞阳县| 虞城县| 正阳县| 桂阳县| 县级市| 靖远县| 永仁县| 剑川县| 黔江区| 冷水江市| 北辰区| 张掖市|