From the course: Learning ArcGIS Python Scripting
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Python syntax rules - ArcGIS Pro Tutorial
From the course: Learning ArcGIS Python Scripting
Python syntax rules
- [Instructor] This video is for people who are very new to scripting, especially Python scripting. If you're already comfortable with basic Python syntax, you can progress to later videos in this course and start writing scripts in ArcGIS. All scripting languages have rules that must be followed in the code. These rules are called the syntax of the language. Before you jump into writing Python code, you need to make sure you know a little bit about Python syntax. Syntax is sort of the grammar and the punctuation of scripting. It's where to put the spaces and the quotes and whether it's important to pay attention to the case of the text. Let's learn a little about this Python syntax by testing out a few lines of Python code. The first rule of Python syntax is that Python is case-sensitive. So for example, the print statement in Python prints a message out to the user as we've seen before. So I'll print the message, 23 records processed. So when I run this, it works fine. If I had…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.