What are the new features in Python 3.9

Python 3.9 features:

1. High performance andflexibility – PEG basedparser (replaced currentLL(1) ) has high performanceand stability.

2. New 2 operatorsmerge “|”, and “|=” updateare introduced forDictionary operations

3. new two string functionsadded to string object for easy coding experience.they are ‘removeprefix(string)’and removesuffix(string) as below’prefix-n’. removeprefix(‘prefix-‘)’n-suffix’. removesuffix(‘-suffix’)both code provides ‘n’ as result

4. Type hinting for built-in generictypes for easy coding & understanding

What is single and double slash for xpath

#shorts
What is Single slash ‘/’
in Xpath in selenium:

Single slash ‘/’ is used
when absolute Xpath
is considered for Element
identification for Selenium
WebDriver

What is Double slash ‘//’
in Xpath in selenium:

Double slash ‘//’ is used
when relative Xpath
is considered for Element
identification for Selenium
WebDriver

Relative Xpath ‘//’
is better Element
identification strategy

Java access modifiers:default, public, privateand protected

Java access modifiers:default, public, privateand protected.

1. default access modifier:here variables and methodsare accessible with in samepakage and not in other pakages

2. public access modifier:variables and methods are acce-ssible in same & other pakages

3. private access modifier:does not allow accessoutside to class or file

4. protected access modifier:here same pakage accessis allowed and other pakageaccess is allowed throughsubclass by extending theclass having protectedvariables and methods

#shorts#javaaccessmodifiers#access#modifiers#default#public#private#protected

Docker image commands

//Build an image fromDockerfile and tag it docker

build -t appimage:1.1

//List all images

docker image ls

//Delete an image

docker image rm appimage:1.1

// to get rootprivilege use’sudo’ before above commands

e. g. sudo docker image ls

#shorts

Most useful git commands

Most useful git commands are git init, git add ., git commit, git push, git pull, git feth

1. git init// to start local repo

2. git add .//to add local changesto staging area

3. git commit -m “change1″// to collect stagedchanges

4. git push// to push localcommittedchanges toremote branch

5. git fetch// will fetchremote branchchanges to yourlocal repo (notto workspcae)

6. git pull// it is git fetch + mergeto your workspace

7. git remote show origin// to find remote git url

8. git checkout baranch// checkout to local branchall commits will be recorded

9. git checkout -b branch// create new local branchand check out