Quantcast
Channel: Active questions tagged return-value - Stack Overflow
Viewing all articles
Browse latest Browse all 207

import script value in different script with new results (diceroller)

$
0
0

I'm learning to write python to create scripts to automate stuff for DD.And I'm positive that there most likely is a built in solution for this.

I have certain functions from external scripts that I would like to call several times.

For example, let's say I have a script called d6.py that says.

import randomd6 = random.randint(1,6)

I then import that script in my other script called diceroller.py to use.

from d6 import *print (d6)print (d6)

How do I make the print statement return different values?

I have tried to search using several search terms, but I think I lack the programming "vocabulary" to know how to find the solution.


Viewing all articles
Browse latest Browse all 207

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>