How to find the highest end value of nla strips in a group of objects?
The first issue is that with myset = set([strip.frame_end]) you are creating a new set each time the loop runs and only ever adding one value. When you call max() is finds there is one value, which it then picks as the max (as there are no other values in myset to compare it to).

The second issue - the reason why it is printing out all the values instead of just one - is that aside from the previous issue, the print() statement is inside the main loop, which is why it prints each time.

So you need to:


Store myset outside the for loop and add values to it in the loop (instead of overwriting it).
Look for the max value once the loop has finished.


The new code:

import bpy
from random import choice

scene = bpy.context.scene
o = bpy.context.object
random_group = choice(o.users_group)
obs = random_group.objects[:]
myMaterials = bpy.data.materials

myset = []

for o in obs:
    myMaterials = o.data.materials
    for material in myMaterials:  
        # Get all materials of currently selected object (if any)
        if o.type == 'CURVE' or o.type == 'MESH':
            if o.data.materials:
                if material.animation_data is not None:
                    track = material.animation_data.nla_tracks
                    if material.animation_data and material.animation_data.nla_tracks:
                        for track in material.animation_data.nla_tracks:
                            for strip in track.strips:
                                #myset = set([strip.frame_end])
                                #print (max(myset))
                                myset.append(strip.frame_end)

print(max(myset))


So, instead of making a set and immediately printing it, I append the strip.frame_end value into a list (as there doesn't seem to be a need for a set, though I have kept the name myset) and print the max of it at the end.