title: how to remove item from array list in kotlin
body: <pre><code>data class RideDate(var enddate: String? = null,var startdate: String? = null) 
  
  
  
   fun main(args: Array&lt;String&gt;) {
  var listOfRideDate = mutableListOf&lt;RideDate&gt;();
  val date1 = RideDate()
  date1.startdate = "2018-11-05 00:00:00 +0000"
  date1.enddate = "2018-11-06 23:59:59 +0000"
  listOfRideDate.add(date1)
  
  val date2 = RideDate()
  date2.startdate = "2020-01-20 00:00:00 +0000"
  date2.enddate = "2020-02-20 00:00:00 +0000"
  listOfRideDate.add(date2)
  
  val date3 = RideDate()
  date3.startdate = "2020-03-20 00:00:00 +0000"
  date3.enddate = "2020-03-20 00:00:00 +0000"
  listOfRideDate.add(date3)
  
  val date4 = RideDate()
  date4.startdate = "2020-04-20 00:00:00 +0000"
  date4.enddate = "2020-04-20 00:00:00 +0000"
  listOfRideDate.add(date4)
  
  val date5 = RideDate()
  date5.startdate = "2020-11-20 00:00:00 +0000"
  date5.enddate = "2020-11-20 00:00:00 +0000"
  listOfRideDate.add(date5)
  
  
  for (i in 0..listOfRideDate.size -1) {
      // we have to remove 2018-11-05 00:00:00 +0000 and 2018-11-06 23:59:59 +0000  from list 
      println(listOfRideDate.get(i).startdate + " and " + listOfRideDate.get(i).enddate)
  }
  </code></pre>
  
  <p>}</p>
  
  <p>This is my data class and the main method I have added item RideDate of startDate and endDate 
  manually  I want  delete item dynamically if data contains 
     date1.startdate = "2018-11-05 00:00:00 +0000"
      date1.enddate = "2018-11-06 23:59:59 +0000"</p>
  
  <p>so that I can ignore it please help me how to delete the item from array list in kotlin </p>