type() - Python for Integrated Circuits - - An Online Book - |
||||||||
| Python for Integrated Circuits http://www.globalsino.com/ICs/ | ||||||||
| Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix | ||||||||
================================================================================= General types. Code: ============================================ Input with specific type of variables. Code: ============================================ Differences between raw string and regular string, and their conversion. Code: In the code you provided, both myFolderA and myFolderB are assigned string values, so they are of the same data type (<class 'str'>). However, there is a difference between these two strings, which is the presence of the letter 'r' before the double quotation mark in myFolderA. This 'r' indicates that the string is a "raw string," and it affects how escape sequences are interpreted in the string. In a raw string, escape sequences (like \n, \t, etc.) are treated as literal characters and not as special escape sequences. In a regular string, escape sequences are interpreted as special characters. ============================================
|
||||||||
| ================================================================================= | ||||||||
|
|
||||||||