I would like to save my output data in two columns. I tried
but have two problems:
1. There are ~10000 values for each x and y, but the intermediates are omitted;
2. I'd like to list data in two columns instead of two arrays (BTW, it's fine as I can format it using other scripts. I just want to know whether there is any "magic" Python command).
Here is the output data:
Any comment would be highly appreciated!
Thanks a lot for your inputs. However, I guess I didn't state my problem clearly. The purpose of my Python script is to run certain equations with a few parameters as input, and to output the final results. So I don't have a list of data in the format of
as my input.
The output is defined in the script as
What I need in the script is to generate the array, something like(sorry I am new to Python):
or
Thanks!
You have a tuple (2 items) where each is an array.
So you can loop through one of the tuple arrays for its length and just use a simple incrementing counter to output that index in each array.
Feel free to change the print to make the "columns" look like you want.
I mean you can use string formatting if you like if you want some kind of "fixed" widths style.
Hi all,
What is the maximum number of sed squeezing in one shell?? I've surprised with this message when I squeezed 50 sed in the same shell:
253: Identifier too long - maximum length is 18.This is what I've did in my sed query
| sed -e "s/ 0 /Default /" | sed -e "s/ 1 ... (2 Replies)
I am trying to calculate the maximum number from four numbers input by the user. I have the following code, but it does not work. It says there's an error with the last line "done". Any help would be appreciated.
max=0
echo "Please enter four numbers: "
for i in 1 2 3 4
do
read number... (17 Replies)
Hi,
Could any one please let me know what is the maximum number of characters
that will fit into a single line of a flat file on a unix.
Thanks. (1 Reply)
Hi,
What is the maximum number of arguments that could be passed to zsh ?
To find out that I tried a simple script.
And the maximum number of arguments that could be passed turned out to be 23394
#! /bin/zsh
arg=1
i=1
subIndex=23000
while
do
arg=$arg" "$i
i=$(($i + 1))... (9 Replies)
maximum number of dots in a domain name - not a sub-domain name.
for example:
mydomain.com ------ one dot
mydomain.com.au ------ two dots
do you know maximum number of dots in a domain name and could you provide a sample?
thx. (1 Reply)