Skip to content

Commit 21c1347

Browse files
authored
Update company-based.md
1 parent 3261ca5 commit 21c1347

File tree

1 file changed

+50
-6
lines changed

1 file changed

+50
-6
lines changed

company-based.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#### GS Lab
2-
- How will you sort result of student whose marks are unknown to
3-
you based on their roll numbers?
4-
Using bubble sort.
2+
- How will you sort result of student whose marks are unknown to you based on their roll numbers?
3+
Using bubble sort.
54

65
#### Webonise labs
76

@@ -413,6 +412,7 @@
413412
- AWS::Lambda::Function is the Cloudformation syntax to define a Lambda function.
414413
- AWS::Serverless::Function is the AWS SAM syntax to define a Lambda function which internally creates a Lambda function in Cloudformation (AWS::Lambda::Function) and related resources by convention when executing AWS SAM.
415414
- How will you create security groups in AWS?
415+
416416
- How to create key pairs?
417417

418418
---
@@ -505,7 +505,6 @@
505505
- numpy
506506
- pandas
507507
- scipy
508-
- Using REST API, fetch image as requested by user.
509508
---
510509
### Afour
511510
- Python
@@ -548,13 +547,58 @@
548547

549548
*Method 2*:
550549
one liner
550+
551+
552+
Q.26. How would you display a file’s contents in reversed order?
553+
554+
Let’s first get to the Desktop. We use the chdir() function/method form the os module for this.
555+
556+
import os
557+
os.chdir('C:\\Users\\lifei\\Desktop')
558+
559+
The file we’ll use for this is Today.txt, and it has the following contents:
560+
561+
OS, DBMS, DS, ADA
562+
563+
HTML, CSS, jQuery, JavaScript
564+
565+
Python, C++, Java
566+
567+
This sem’s subjects
568+
569+
Debugger
570+
571+
itertools
572+
573+
container
574+
575+
Let’s read the contents into a list, and then call reversed() on it:
576+
for line in reversed(list(open('Today.txt')))
577+
print(line.rstrip())
578+
579+
container
580+
581+
itertools
582+
583+
Debugger
584+
585+
This sem’s subjects
586+
587+
Python, C++, Java
588+
589+
HTML, CSS, jQuery, JavaScript
590+
591+
OS, DBMS, DS, ADA
592+
593+
Without the rstrip(), we would get blank lines between the output.
551594

552-
- What is use of serialization?
553-
-
595+
- What is use of serialization?
596+
554597

555598
- Openstack
556599
- What are storage types?
557600
Block, Object, File, Tape.
601+
558602
---
559603
### Accion Labs
560604
- AWS

0 commit comments

Comments
 (0)