Jump to content
  • 0

Python String Count() Method


Question

Posted

Hi all im wondering how to define more than 1 item

for example this: 

def onEvent(self,event,st):
		htmltext = event
		count=st.getQuestItemsCount(Item1)
		count=st.getQuestItemsCount(Item2)

 

2 answers to this question

Recommended Posts

  • 0
Posted

Do you mean something like this?

 

count1 = st.getQuestItemsCount(Item1)
count2 = st.getQuestItemsCount(Item2)

if count1 > 0 and count2 > 0:
    # some code
 

  • 0
Posted

Do you mean something like this?

 

count1 = st.getQuestItemsCount(Item1)

count2 = st.getQuestItemsCount(Item2)

if count1 > 0 and count2 > 0:

    # some code

 

mm not working with this method.

Guest
This topic is now closed to further replies.
×
×
  • Create New...