Posts

Showing posts with the label Validate Tuple

Tuples in Jython

Image
Tuple Hi everyone in this post I would like to workout how does the Jython tuple can be constructed and how to display their content and their operations. WebSphere Admin must know about tuple because it is heavily used internal MBeans for storing data in them. What I have understood about Tuple data type is: A tuple is a sequence of immutable Python Objects in the Jython The  tuple content cannot be changed - only assignment that is why we don't see any other functions on them Use parenthesis () to define Here elements can be stored into a tuple with comma-separated values Tuples can contain numbers, strings, nested sub-tuples, or nothing or combination that is heterogeneous types Tuple in Jython Let me experiment and prove that all. # This script list how to use the tuple. t1=(1,2,3,4) print "integer tuple", t1 t2=(1.2,10.5,13.4) print "float tuple", t2 t3=('app1','app2','app3') print "string tuple", ...