Python Forum
Simple Question - ' defined as "a". ?'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Question - ' defined as "a". ?'
#2
Assuming both files are in the same directory:

Save this as a.py
print("Hi. My name is 'a'")
Save this as the script that is doing the import
import a
Have a play with that and see if you can work it out.
Ryan012 likes this post
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply


Messages In This Thread
Simple Question - ' defined as "a". ?' - by Ryan012 - May-25-2023, 01:37 PM
RE: Simple Question - ' defined as "a". ?' - by rob101 - May-25-2023, 02:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Very Beginner question on simple variables Harvy 1 279 Apr-12-2024, 12:03 AM
Last Post: deanhystad
  Very simple question about filenames and backslashes! garynewport 4 2,072 Jan-17-2023, 05:02 AM
Last Post: deanhystad
  Python Tkinter Simple Multithreading Question AaronCatolico1 5 1,718 Dec-14-2022, 11:35 PM
Last Post: deanhystad
  A simple "If...Else" question from a beginner Serena2022 6 1,821 Jul-11-2022, 05:59 AM
Last Post: Serena2022
  Simple arithmetic question ebolisa 5 2,141 Dec-15-2021, 04:56 PM
Last Post: deanhystad
  Simple Python script, path not defined dubinaone 3 2,761 Nov-06-2021, 07:36 PM
Last Post: snippsat
  Simple code question about lambda and tuples JasPyt 7 3,469 Oct-04-2021, 05:18 PM
Last Post: snippsat
Big Grin question about simple algorithm to my problem jamie_01 1 1,729 Oct-04-2021, 11:55 AM
Last Post: deanhystad
  Simple question 1234 4 2,343 Dec-04-2020, 12:29 PM
Last Post: DeaD_EyE
  Simple Timer Question cranberrica 3 2,256 Jun-22-2020, 06:29 PM
Last Post: cranberrica

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020