def random(fileName)

    setup = open(fileName, "r" )
    z = setup.readline()
    waiting = stack()
    for line in setup:
        customerNum, arrivalTime, serviceTime = line.split()
        plane = Customer(customerNum, arrivalTime, serviceTime)
        push(waiting, plane)
    setup.close()
    print "The data file specifies a", z, "-server simulation."
    print "There are", len(waiting) , "arrival events in the data file."

This is the output, I tried a bunch of stuff but I get that line break after the variable z every time!
The data in the text file is ran through a clas I created but that has not effect with this print statement??

Please Enter a Filename. test.txt
The data file specifies a 5
-server simulation.
There are 1000 arrival events in the data file.
linux2[23]%

that worked thanks, how about removing the space that comes after z???
I want "-server simulation." after z or the "5" in this case, just without that space
output:

Please Enter a Filename. test.txt
The data file specifies a 5 -server simulation.
There are 1000 arrival events in the data file.
linux2[24]%

print "The data file specifies a "+ z+ "-server simulation."

I'm not sure if it'll work, I currently don't have an active python ide/compiler.

Edited 4 Years Ago by Lucaci Andrew

I feel dumb, it worked....I thought I would get that error message cannot concatenate blah blah blah you know the rest. Cheers

This question has already been answered. Start a new discussion instead.