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

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.
主站蜘蛛池模板: 夏河县| 临邑县| 河东区| 陆丰市| 都昌县| 陇川县| 麻江县| 平原县| 阜平县| 车致| 翁源县| 绍兴县| 伊吾县| 崇信县| 大足县| 永年县| 叙永县| 松阳县| 青神县| 澜沧| 棋牌| 永吉县| 娄底市| 布尔津县| 巴东县| 德钦县| 腾冲县| 巴里| 湘西| 乐山市| 天祝| 迁安市| 临漳县| 历史| 阳泉市| 淮北市| 鄂托克旗| 关岭| 六盘水市| 阳江市| 灵石县|