Skip to content
Felix
  • Topics
    • My List
    • Felix Guide
    • Asset Management
    • Coding and Data Analysis
      • AI
      • Data Analysis and Visualization
      • Financial Data Tools
      • Python
      • SQL
    • Credit
      • Credit Analysis
      • Restructuring
    • Financial Literacy Essentials
      • Financial Data Tools
      • Financial Math
      • Foundations of Accounting
    • Industry Specific
      • Banks
      • Chemicals
      • Consumer
      • ESG
      • Insurance
      • Oil and Gas
      • Pharmaceuticals
      • Project Finance
      • Real Estate
      • Renewable Energy
      • Technology
      • Telecoms
    • Introductory Courses
    • Investment Banking
      • Accounting
      • Financial Modeling
      • M&A and Divestitures
      • Private Debt
      • Private Equity
      • Valuation
      • Venture Capital
    • Markets
      • Economics
      • Equity Markets and Derivatives
      • Fixed Income and Derivatives
      • Introduction to Markets
      • Options and Structured Products
      • Other Capital Markets
      • Securities Services
    • Microsoft Office
      • Excel
      • PowerPoint
      • Word & Outlook
    • Professional Skills
      • Career Development
      • Expert Interviews
      • Interview Skills
    • Risk Management
    • Transaction Banking
    • Felix Live
  • Pathways
    • Investment Banking
    • Asset Management
    • Equity Research
    • Sales and Trading
    • Commercial Banking
    • Engineering
    • Operations
    • Private Equity
    • Credit Analysis
    • Restructuring
    • Venture Capital
    • CFA Institute
  • Certified Courses
  • Ask An Instructor
  • Support
  • Log in
  • Topics
    • My List
    • Felix Guide
    • Asset Management
    • Coding and Data Analysis
      • AI
      • Data Analysis and Visualization
      • Financial Data Tools
      • Python
      • SQL
    • Credit
      • Credit Analysis
      • Restructuring
    • Financial Literacy Essentials
      • Financial Data Tools
      • Financial Math
      • Foundations of Accounting
    • Industry Specific
      • Banks
      • Chemicals
      • Consumer
      • ESG
      • Insurance
      • Oil and Gas
      • Pharmaceuticals
      • Project Finance
      • Real Estate
      • Renewable Energy
      • Technology
      • Telecoms
    • Introductory Courses
    • Investment Banking
      • Accounting
      • Financial Modeling
      • M&A and Divestitures
      • Private Debt
      • Private Equity
      • Valuation
      • Venture Capital
    • Markets
      • Economics
      • Equity Markets and Derivatives
      • Fixed Income and Derivatives
      • Introduction to Markets
      • Options and Structured Products
      • Other Capital Markets
      • Securities Services
    • Microsoft Office
      • Excel
      • PowerPoint
      • Word & Outlook
    • Professional Skills
      • Career Development
      • Expert Interviews
      • Interview Skills
    • Risk Management
    • Transaction Banking
    • Felix Live
  • Pathways
    • Investment Banking
    • Asset Management
    • Equity Research
    • Sales and Trading
    • Commercial Banking
    • Engineering
    • Operations
    • Private Equity
    • Credit Analysis
    • Restructuring
    • Venture Capital
    • CFA Institute
  • Certified Courses
Felix
  • Data
    • Company Analytics
    • My Filing Annotations
    • Market & Industry Data
    • United States
    • Relative Valuation
    • Discount Rate
    • Building Forecasts
    • Capital Structure Analysis
    • Europe
    • Relative Valuation
    • Discount Rate
    • Building Forecasts
    • Capital Structure Analysis
  • Models
  • Account
    • Edit my profile
    • My List
    • Restart Homepage Tour
    • Restart Company Analytics Tour
    • Restart Filings Tour
  • Log in
  • Ask An Instructor
    • Email Our Experts
    • Felix User Guide
    • Contact Support

Legacy – Python Basics

Understand how to code in Python, the common data types, concatenating, replicating, creating lists, sets and some basic functions in Python.

Unlock Your Certificate   
 
0% Complete

12 Lessons (29m)

Show lesson playlist
  • 1. Legacy - Basic Operators Workout

    02:47
  • 2. Legacy - Naming and Storing Variables

    01:33
  • 3. Legacy - Naming and Storing Variables Workout

    04:24
  • 4. Legacy - String Concatenation and Replication

    02:00
  • 5. Legacy - String Concatenation and Replication Workout

    03:08
  • 6. Legacy - Creating Lists

    01:44
  • 7. Legacy - Creating Lists Workout

    02:46
  • 8. Legacy - Creating Sets

    01:16
  • 9. Legacy - Creating Sets Workout

    02:47
  • 10. Legacy - Basic Functions

    02:10
  • 11. Legacy - Basic Functions Workout

    03:50
  • 12. Python Basics Tryout


Prev: Legacy – Getting Started with Python Next: Legacy – Building Functions

Legacy - Naming and Storing Variables Workout

  • Notes
  • Questions
  • Transcript
  • 04:24

Learn how to name and store variables in PyCharm.

Downloads

Naming and Storing Values in Variables - Python Workout Files

Glossary

Invalid Naming Convention Valid Naming Convention
Back to top
Financial Edge Training

© Financial Edge Training 2025

Topics
Introduction to Finance Accounting Financial Modeling Valuation M&A and Divestitures Private Equity
Venture Capital Project Finance Credit Analysis Transaction Banking Restructuring Capital Markets
Asset Management Risk Management Economics Data Science and System
Request New Content
System Account User Guide Privacy Policy Terms & Conditions Log in
Transcript

Let us now see how to name and store values of variables in PyCharm. In this example, we can either use the Python console or the code editor in which we run the code and the output is shown in this window. But rather than using the Python console, we shall be using the code editor. For the first example, let us create a variable called assets and give it a value of 1000. We shall ignore whether it is a current or a long term asset for this scenario, in order for PyCharm to output the value, we will have to use the print function. But before doing that, in order to run this variable, we have to go to the tab and say run, this has to be done the first time in order to register the tab which are running. Now in order for PyCharm to output the value, we have to use the print function and say assets, the print function prints the value of the variable in the window. Now, we can use this shortcut at the top of the window to run the command. It pastes the value of 1000. Now let us create another variable called liabilities.

And give it a value of 5000. Let us again ignore whether it is a current or a long term liability. And also the side. If we want to print the value of the liability, we're going to use the print function and ask liabilities. If you observe PyCharm has the advantage of auto completion because it registered a variable as liabilities. And in order to run it, we can use the shortcut up top if you observe Shift F 10 is the shortcut of running the command. And again, the value 5000 is pasted at the bottom. Now imagine that there is a addition of $2,000 to the company's assets. So we are going to rename the variable as assets equals assets plus 2000. And we are going to use the shortcut Shift f1. To run it, the code has been executed if we ask PyCharm to print the value of assets, it's going to give it a value of 3000. So when a variable is initialised, or created, a value is stored at the first time, you can use the same variable in other expressions with other variables or values. When a variable is reassigned with a new value, the old value is forgotten. This is the reason the value of the assets is 3000 rather than 1000. This is called overriding the variable. Let's try to do this with a string and see what happens. So if we create a new variable lag, and say that WACC stands for weighted average capital cost and you run the code, but then you realise 'oh no I made a mistake, what should I do?' It's easy. You can rename the variable, say, Okay, PyCharm I made a mistake. It's weighted average cost of capital. And you run the same code using the shortcut Shift f10 simple and now you can try to print work and see what happens. And it says it's weighted average cost of capital at the bottom of the screen, which is right. So we have overwritten the mistake that we made in the first instance. They are also case sensitive, meaning the word WACC with an all uppercase is totally different from WACC with lowercase and similarly with some uppercase and some lowercase. Note that we use the hash sign to commit in Python so when we run the code, the sentence or values following the hash wouldn't be executed as part of the code

Content Requests and Questions

You are trying to access premium learning content.

Discover our full catalogue and purchase a course Access all courses with our premium plans or log in to your account
Help

You need an account to contact support.

Create a free account or log in to an existing one

Sorry, you don't have access to that yet!

You are trying to access premium learning content.

Discover our full catalogue and purchase a course Access all courses with our premium plans or log in to your account

You have reached the limit of annotations (10) under our premium subscription. Upgrade to unlock unlimited annotations.

Find out more about our premium plan

You are trying to access content that requires a free account. Sign up or login in seconds!

Create a free account or log in to an existing one

You are trying to access content that requires a premium plan.

Find out more about our premium plan or log in to your account

Only US listed companies are available under our Free and Boost plans. Upgrade to Pro to access over 7,000 global companies across the US, UK, Canada, France, Italy, Germany, Hong Kong and more.

Find out more about our premium plan or log in to your account

A pro account is required for the Excel Add In

Find out more about our premium plan

Congratulations on completing

This field is hidden when viewing the form
Name(Required)
This field is hidden when viewing the form
Rate this course out of 5, where 5 is excellent and 1 is terrible.
Were the stated learning objectives met?(Required)
Were the stated prerequisite requirements appropriate and sufficient?(Required)
Were the program materials, including the qualified assessment, relevant and did they contribute to the achievement of the learning objectives?(Required)
Was the time allotted to the learning activity appropriate?(Required)
Are you happy for us to use your feedback and details in future marketing?(Required)

Thank you for already submitting feedback for this course.

CPE

What is CPE?

CPE stands for Continuing Professional Education, by completing learning activities you earn CPE credits to retain your professional credentials. CPE is required for Certified Public Accountants (CPAs). Financial Edge Training is registered with the National Association of State Boards of Accountancy (NASBA) as a sponsor of continuing professional education on the National Registry of CPE Sponsors.

What are CPE credits?

For self study programs, 1 CPE credit is awarded for every 50 minutes of elearning content, this includes videos, workouts, tryouts, and exams.

CPE Exams

You must complete the CPE exam within 1 year of accessing a related playlist or course to earn CPE credits. To see how long you have left to complete a CPE exam, hover over the locked CPE credits button.

What if I'm not collecting CPE credits?

CPE exams do not count towards your FE certification. You do not need to complete the CPE exam if you are not collecting CPE credits, but you might find it useful for your own revision.


Further Help
  • Felix How to Guide walks you through the key functions and tools of the learning platform.
  • Playlists & Tryouts: Playlists are a collection of videos that teach you a specific skill and are tested with a tryout at the end. A tryout is a quiz that tests your knowledge and understanding of what you have just learned.
  • Exam: If you are collecting CPE points you must pass the relevant CPE exam within 1 year to receive credits.
  • Glossary: A glossary can be found below each video and provides definitions and explanations for terms and concepts. They are organized alphabetically to make it easy for you to find the term you need.
  • Search function: Use the Felix search function on the homepage to find content related to what you want to learn. Find related video content, lessons, and questions people have asked on the topic.
  • Closed Captions & Transcript: Closed captions and transcripts are available on videos. The video transcript can be found next to the closed captions in the video player. The transcript feature allows you to read the transcript of the video and search for key terms within the transcript.
  • Questions: If you have questions about the course content, you will find a section called Ask a Question underneath each video where you can submit questions to our expert instructor team.