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

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.
主站蜘蛛池模板: 郴州市| 石家庄市| 平武县| 垦利县| 定日县| 崇阳县| 神农架林区| 高碑店市| 临安市| 长沙市| 额尔古纳市| 濮阳市| 莱西市| 中江县| 安仁县| 渭源县| 平远县| 康平县| 重庆市| 屏东市| 雷州市| 鹿泉市| 富民县| 荣成市| 固原市| 石楼县| 观塘区| 临武县| 中宁县| 星子县| 岫岩| 梓潼县| 磴口县| 青州市| 玉溪市| 霍城县| 山阴县| 霞浦县| 巫山县| 柳林县| 奉节县|