Featured post

How to decode Tag-Length-Value Quickly

Basically, in TLV, the format is Tag, Length, and Value. In the list of protocols, TLV is one of the types. Transmitting the data depends on the protocol you used. However, many financial transactions still follow the TLV format. According to IBM, TLV data is three parts. The tag tells what type of data it is. The length field has a length of the value. The Value field has actual value.

Structure of TLV.TLV comprises three field values.  TagLengthValueEMV formulated different tags. They have their own meanings. Usually, the Tag and Length together takes 1 to 4 bytes.
The Best example for TLV.In the below example, you can find the sample TAG, LENGTH, and VALUE fields.

[Tag][Value Length][Value] (ex. "9F4005F000F0A001")
where

Tag Name = 9F40

Value Length (in bytes) = 05 
Value (Hex representation of bytes. Example, "F0" – 1-byte) = F000F0A001

In the above message, tag 9F40 has some meaning designed by EMV company. Here you can find a list of EMV Tags.
How to read the TLVTag: 1…

Python Assigning Multiple Values at Once

Assigning values to a variable is similar to other languages. In python, you can find different styles. Usually, a variable takes or stores values when the programmer assigns. Check my below example for understanding quickly. Here is Python For Loop Tricky Example.

***

Python Assigning the Values At once.

a = 1

b = 1

c = 1

d = 1

or, you can assign simultaneously as;

a=b=c=d=1

Python Assigning Multiple Values at Once

Python Assigning Multiple Values at Once

The other way you can assign as;

a, b, c, d = 10, 1, 3.5, 'Srini'

From the above, you can understand as below:

  • The '10' assigns to a.
  • The '1' assigns to b.
  • The '3.5' assigns to c.
  • Then 'Srini' to d.

 References

  1. Python Basics Variable Assignment

Comments

Popular posts from this blog

Hyperledger Fabric: 20 Real Interview Questions

How to Fix Python Syntax Errors Quickly

Tokenization: Vault based Vs Vault-less