Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taskB_inlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cs251-group38
taskB_inlab
Commits
aabca92c
Commit
aabca92c
authored
Aug 24, 2016
by
ORSU AKHIL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
task B3
parent
65ce4ac4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
task3.py
task3.py
+29
-0
No files found.
task3.py
0 → 100644
View file @
aabca92c
def
function2
(
list
,
n
)
:
newlist
=
[
k
[
n
]
for
k
in
list
]
#print (newlist)
#sortlist=newlist.sort()
return
newlist
input
=
[]
m
=
open
(
"matrix.txt"
)
tempind
=
m
.
readline
()
index
=
[
int
(
x
)
for
x
in
tempind
.
split
()]
row
=
index
[
0
]
column
=
index
[
1
]
newrow
=
str
(
column
)
newcolumn
=
str
(
row
)
a
=
open
(
"transpose.txt"
,
"w+"
)
a
.
write
(
newrow
+
" "
+
newcolumn
+
"
\n
"
)
for
akih
in
range
(
row
):
temp
=
m
.
readline
()
temprow
=
[
int
(
x
)
for
x
in
temp
.
split
()]
input
.
append
(
temprow
)
#mysr = " ".join(str(any) for any in temprow)
#a.write(mysr+"\n" )
m
.
close
()
x
=
0
for
x
in
range
(
column
):
ak
=
function2
(
input
,
x
)
mysr
=
" "
.
join
(
str
(
any
)
for
any
in
ak
)
a
.
write
(
mysr
+
"
\n
"
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment